package com.qy.util;



public class StaticData {
	
	/**没有参数*/
	public static int no_param = -1;
	/**一级分隔符*/
	public static final String first_split = "#";
	public static final String second_split = ",";
	/**每页多少条*/
	public static int page_size = 10;
	
	/**
	 * redis的键值
	 * @author zwl
	 *
	 * 2018年2月1日
	 */
	public static enum REDISKEY{ V_CODE_ERROR,
		BS_S_PARAMS; }
	
	/**
	 * 代金券状态
	 * @author zwl
	 * 2018年2月1日
	 */
	public static enum OrderStatus {
	    CANCEL (-1,"取消订单"),
	    CREATE_NOT_PAY (0,"生成未支付"),
	    PAY_NOT_ACCEPT (1,"支付了还没有接单"), 
	    ACCEPT_NOT_ARRIVE (2,"接单了未到达"),
	    ARRIVE_NOT_CHECK (3,"已到达取车地点，点击到达，开始倒计时,未扫码"),
	    CHECK_NOT_START (4,"已经扫码取车，未拍照开始"),
	    START_NOT_ARRIVE_STATION (5,"开始还未到车检站"),
	    NOT_COMPLET_CHECK (6,"车检员接单还未检车完成"),
	    COMPLET_CHECK_NOT_ACCEPT (7,"检车完成还未返程接单"),
	    ACCEPT_NOT_CHECK (8,"有人接返程单，还未到达扫码"),
	    CHECK_NOT_ARRIVE (9,"到达扫码，还未到达还车点"),
	    ARRIVE_COUNT_DOWN (10,"已到达还车地点，点击到达，开始倒计时"),
	    USER_CHECK_FINISH (11,"车主扫码，订单完成"),
	    COUNT_DOWN_OVER (12,"倒计时结束，开启送达指定地点订单。"),
	    ARRIVE_SYSTEM (13,"已送达公司收车点"),
	    SYSTEM_FINISH (14,"确定车主无法联系，送车至指定地点，完成订单。");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private OrderStatus( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }

	/**
	 * 提现状态
	 * @author zwl
	 * 2018年2月1日
	 */
	public static enum WithDrawStatus {
	    CREATE (0,"创建待审核"),
	    REJECT (1,"审核未通过"),
	    PASS (2,"审核通过");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private WithDrawStatus( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }

	
	/**
	 * 订单类型
	 * @author zwl
	 * 2018年2月1日
	 */
	public static enum PayInfoType {
	    VOUCHER_PAY (1,"代金券订单"),
	    ORDER_PAY (2,"订单支付");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private PayInfoType( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }

	/**
	 * 订单信息
	 * @author zwl
	 * 2018年2月1日
	 */
	public static enum PayInfoStatus {
	    CREATE (0,"创建还未支付完成"),
	    FINISH (1,"支付完成"),
	    REFUND (2,"退款"),
	    ERROR (-1,"支付异常");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private PayInfoStatus( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }

	
	/**
	 * 司机服务订单
	 * @author zwl
	 * 2018年2月1日
	 */
	public static enum DriverOrderStatus {
	    SETTLE_ERROR (-100,"订单结算异常"),
	    NORMAL (0,"正常,接单了还未开始"),
	    START (1,"开始服务"),
	    END (2,"服务结束");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private DriverOrderStatus( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }

	
	/**
	 * 代金券状态
	 * @author zwl
	 *
	 * 2018年2月1日
	 */
	public static enum VoucherStatus {
		HAS_USE (-1,"已使用"),
		NOT_PAY (1,"待支付"),
		NORMAL (0,"正常");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private VoucherStatus( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }
	/**
	 * 用户状态
	 * @author zwl
	 * 2018年1月30日
	 */
	public static enum userStatus {
		normal (0,"正常"),
		perfect_information (1,"完善信息"),
		lock (4,"锁定");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private userStatus( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }

	/**
	 * 司机状态
	 * 1生成用户
	 * 2完善信息
	 * @author zwl
	 * 2018年1月30日
	 */
	public static enum driverStatus {
		normal (0,"正常"),
		perfect_information (1,"完善信息"),
		wait_check (2,"等待审核"),
		reject (3,"驳回"),
		lock (4,"锁定");
	    // 定义私有变量
	    private int type ;
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private driverStatus( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }
	
	/**
	 * 用户类型
	 * @author zwl
	 * 2018年1月30日
	 */
	public static enum userType {
		COMMON_USER (1,"普通用户"),
		CHANNEL_USER (2,"渠道用户"),
		DRIVER_USER (3,"司机"),
		CHECK_USER (4,"车检员");
	    // 定义私有变量
	    private int type ;
	    
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private userType( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }
	
	
	
	
	
	/*
	 * 返回的常用的key
	 * @author 34225_000
	 */
	public static enum reKey {
	    cmd ("cmd","命令码"),
	    code ("code","状态码的key"),
	    teamList ("teamList","战队列表"),
	    result ("result","结果"),
	    userName ("userName","用户名"),
	    userRight ("userRight","用户权限列表"),
	    userInfo("userInfo","用户信息"),
	    nikename("nikename","用户昵称"),
	    image("image","图片"),
	    userId("userId","用户Id"),
	    startDate("startDate","开始时间"),
	    endDate("endDate","结束时间"),
	    gold("gold","用户金币"),
	    bannerList("bannerList","导航条"),
	    newList("newList","新闻列表"),
	    discuss("discuss","评论信息"),
	    sum("sum","求和"),
	    appid("appid","appid"),
	    total("total","总数量"),
	    rows("rows","列表"),
	    pwd ("pwd","密码");

	    // 定义私有变量
	    private String key ;
	    
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private reKey( String key,String explain) {
	        this . key = key;
	        this.explain = explain;
	    }
	    public String getKey() {
	    	return key;
	    }
	    public String getExplain() {
			return explain;
		}
	 }
	/*
	 * 返回的状态码的意思
	 * @author 34225_000
	 */
	public static enum codeType {
	    ok (0,"正常"),
	    user_not_login (1,"用户未登录"),
	    not_is_user (2,"用户名不存在"),
	    verify_error (3,"验证码不正确"),
	    old_pwd_error(4,"旧密码不正确"),
	    NO_RIGHT(5,"权限不够"),
	    param_error(6,"参数异常"),
	    SEND_ERROR(7,"短信发送异常"),
	    user_lock (9,"用户异常被锁定"),
	    param_length_error(10,"参数长度异常"),
	    not_exist(11,"info不存在"),
	    not_exist2(12,"info不存在"),
	    NOT_END_SEVER(13,"还有未完成的服务"),
	    ALREADY_ACCEPT(14,"已经被接单了"),
	    CARD_ERROR(15,"身份证号码有误"),
	    TIME_NOT_OUT(16,"时间还未到"),
	    NOT_THIS_DRIVER(17,"司机信息不匹配"),
	    SETTLE_ERROR(18,"结算订单信息异常"),
	    QR_ERROR(19,"二维码信息异常"),
	    QR_STATUS_ERROR(20,"二维码订单状态异常"),
	    Retype_Password(22,"二维码订单状态异常"),
	    ORDER_not_exist(23,"订单不存在"),
	    PAY_not_exist(24,"支付账单不存在"),
	    CANCEL_ERROR(25,"取消订单退款异常"),
	    ORDER_CANCEL(26,"取消订单异常"),
	    WITHDRAW_NOT_ENOUGH(27,"提现金额异常"),
	    BANK_ERROR(28,"银行卡信息异常"),
	    not_white(103,"不是白名单用户"),
	    user_not_exist(104,"用户不存在"),
	    RED_PACKET_IS_NOT_MEET(108,"红包使用条件不满足"),
	    TIME_OUT(111,"已经超时了"),
	    NOT_ENOUGH(112,"所需条件不满足"),
	    GOLD_NOT_ENOUGH(113,"金币数量异常"),
	    other_error (-1,"服务器未知原因");

	    // 定义私有变量
	    private int type ;
	    
	    // 定义私有变量
	    private String explain ;
	    // 构造函数，枚举类型只能为私有
	    private codeType( int type,String explain) {
	        this . type = type;
	        this.explain = explain;
	    }
	    public int getType() {
	    	return type;
	    }
	    public String getExplain() {
			return explain;
		}
	 }
	/**
	 * 分页初始转换
	 * @param page
	 * @return
	 */
	public static int turnToPage(int page){
		return (page-1)*StaticData.page_size;
	}
	
}


